import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '*',
      name: '*',
      meta: { title: '404-这个页面找不到了！' },
      component: function (resolve) {
        require(['@/pages/NotFound'], resolve)
      }
    },
    {
      path: '/notfound',
      name: 'notfound',
      meta: { title: '功能完善中，敬请期待' },
      component: function (resolve) {
        require(['@/pages/NotFound'], resolve)
      }
    },
    {
      path: '/clearcookie',
      name: 'clearcookie',
      meta: { title: '清理缓存', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/ClearCookie'], resolve)
      }
    },
    {
      path: '/',
      name: '/',
      meta: { title: '会员中心', needjsapi: 'true' },
      component: function (resolve) {
        require(['@/pages/membercenter/MemberCenter'], resolve)
      }
    },
    {
      path: '/home',
      name: 'home',
      meta: { title: '会员中心', needjsapi: 'true' },
      component: function (resolve) {
        require(['@/pages/membercenter/MemberCenter'], resolve)
      }
    },
    {
      path: '/membercenter',
      name: 'membercenter',
      meta: { title: '会员中心', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/membercenter/MemberCenter'], resolve)
      }
    },
    {
      path: '/wechat',
      name: 'wechat',
      meta: { title: '' },
      component: function (resolve) {
        require(['@/pages/Wechat'], resolve)
      }
    },
    {
      path: '/wechatcode',
      name: 'wechatcode',
      meta: { title: '' },
      component: function (resolve) {
        require(['@/pages/WechatCode'], resolve)
      }
    },
    {
      path: '/wechatticket',
      name: 'wechatticket',
      meta: { title: '正在加载', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/WechatTicket'], resolve)
      }
    },
    {
      path: '/routewechatticket',
      name: 'routewechatticket',
      meta: { title: '正在加载', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/RouteWechatTicket'], resolve)
      }
    },
    {
      path: '/coupon',
      name: 'coupon',
      meta: { title: '优惠券', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/Coupon'], resolve)
      }
    },
    {
      path: '/couponinfo',
      name: 'couponinfo',
      meta: { title: '优惠券详情', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/CouponInfo'], resolve)
      }
    },
    {
      path: '/searchlist',
      name: 'searchlist',
      meta: { title: '搜索商品', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/SearchList'], resolve)
      }
    },
    {
      path: '/producthot',
      name: 'producthot',
      meta: { title: '更多热门商品', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/ProductHot'], resolve)
      }
    },
    {
      path: '/productlist',
      name: 'productlist',
      meta: { title: '所有商品', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/ProductList'], resolve)
      }
    },
    {
      path: '/memberlevel',
      name: 'memberlevel',
      meta: { title: '会员福利', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/MemberLevel'], resolve)
      }
    },
    {
      path: '/levelcenter',
      name: 'levelcenter',
      meta: { title: '会员福利', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/LevelCenter'], resolve)
      }
    },
    {
      path: '/leveldetai',
      name: 'leveldetai',
      meta: { title: '会员福利', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/LevelDetai'], resolve)
      }
    },
    {
      path: '/preferential',
      name: 'preferential',
      meta: { title: '会员福利', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/Preferential'], resolve)
      }
    },
    {
      path: '/points',
      name: 'points',
      meta: { title: '我的积分', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/Points'], resolve)
      }
    },
    {
      path: '/clubdetail',
      name: 'clubdetail',
      meta: { title: '俱乐部介绍', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/ClubDetail'], resolve)
      }
    },
    {
      path: '/mall',
      name: 'mall',
      meta: { title: '积分兑礼', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/Mall'], resolve)
      }
    },
    {
      path: '/logistics',
      name: 'logistics',
      meta: { title: '收货地址', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/Logistics'], resolve)
      }
    },
    {
      path: '/usersetting',
      name: 'usersetting',
      meta: { title: '完善信息', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/usersetting/UserSetting'], resolve)
      }
    },
    {
      path: '/newgift',
      name: 'newgift',
      meta: { title: '新人礼', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/newgift/NewGift'], resolve)
      }
    },
    {
      path: '/interest',
      name: 'interest',
      meta: { title: '修改兴趣爱好', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/interest/Interest'], resolve)
      }
    },
    {
      path: '/barcode',
      name: 'barcode',
      meta: { title: '条形码', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/barcode/Barcode'], resolve)
      }
    },
    {
      path: '/perdetails',
      name: 'perdetails',
      meta: { title: '个人信息', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/perdetails/PerDetails'], resolve)
      }
    },
    {
      path: '/expense',
      name: 'expense',
      meta: { title: '消费记录', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/expense/Expense'], resolve)
      }
    },
    {
      path: '/lineitem',
      name: 'lineitem',
      meta: { title: '订单详情', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/lineitem/LineItem'], resolve)
      }
    },
    {
      path: '/memberactivity',
      name: 'memberactivity',
      meta: { title: '会员活动', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/memberactivity/MemberActivity'], resolve)
      }
    },
    {
      path: '/activitylist',
      name: 'activitylist',
      meta: { title: '活动列表' },
      component: function (resolve) {
        require(['@/pages/activitylist/ActivityList'], resolve)
      }
    },
    {
      path: '/activitydetails',
      name: 'activitydetails',
      meta: { title: '活动详情', inmap: '1' },
      component: function (resolve) {
        require(['@/components/activitydetails/ActivityDetails'], resolve)
      }
    },
    {
      path: '/myactivity',
      name: 'myactivity',
      meta: { title: '我的活动', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/myactivity/MyActivity'], resolve)
      }
    },
    {
      path: '/activityapply',
      name: 'activityapply',
      meta: { title: '我要报名', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/activityapply/ActivityApply'], resolve)
      }
    },
    {
      path: '/regactivity',
      name: 'regactivity',
      meta: { title: '报名成功', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/regactivity/RegActivity'], resolve)
      }
    },
    {
      path: '/sports',
      name: 'sports',
      meta: { title: '我要运动' },
      component: function (resolve) {
        require(['@/pages/sports/Sports'], resolve)
      }
    },
    {
      path: '/groupon',
      name: 'groupon',
      meta: { title: '每月团购' },
      component: function (resolve) {
        require(['@/pages/groupon/Groupon'], resolve)
      }
    },
    {
      path: '/productdetail',
      name: 'productdetail',
      meta: { title: '商品详情', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/ProductDetail'], resolve)
      }
    },
    {
      path: '/orderinner',
      name: 'orderinner',
      meta: { title: '确认订单', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/OrderInner'], resolve)
      }
    },
    {
      path: '/orderbuycar',
      name: 'orderbuycar',
      meta: { title: '收藏夹', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/OrderBuyCar'], resolve)
      }
    },
    {
      path: '/orderlist',
      name: 'orderlist',
      meta: { title: '兑换记录', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/OrderList'], resolve)
      }
    },
    {
      path: '/orderdetail',
      name: 'orderdetail',
      meta: { title: '订单详情', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/OrderDetail'], resolve)
      }
    },
    {
      path: '/storelist',
      name: 'storelist',
      meta: { title: '门店列表', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/StoreList'], resolve)
      }
    },
    {
      path: '/coupleBack',
      name: 'coupleBack',
      meta: { title: '建议反馈', needjsapi: 'true', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/coupleBack/CoupleBack'], resolve)
      }
    },
    {
      path: '/appraise',
      name: 'appraise',
      meta: { title: '订单评价', inmap: '1' },
      component: function (resolve) {
        require(['@/pages/appraise/Appraise'], resolve)
      }
    },
    {
      path: '/logisticsinfo',
      name: 'logisticsinfo',
      meta: { title: '物流信息' },
      component: function (resolve) {
        require(['@/pages/logisticsinfo/LogisticsInfo'], resolve)
      }
    },
    {
      path: '/vote',
      name: 'vote',
      meta: { title: '活动详情' },
      component: function (resolve) {
        require(['@/pages/vote/Vote'], resolve)
      }
    },
    {
      path: '/prodetails',
      name: 'prodetails',
      meta: { title: '商品详情' },
      component: function (resolve) {
        require(['@/pages/prodetails/ProDetails'], resolve)
      }
    },
    {
      path: '/choiceness',
      name: 'choiceness',
      meta: { title: '当月精选' },
      component: function (resolve) {
        require(['@/pages/choiceness/Choiceness'], resolve)
      }
    },
    {
      path: '/chprodetails',
      name: 'chprodetails',
      meta: { title: '商品详情' },
      component: function (resolve) {
        require(['@/pages/chprodetails/ChproDetails'], resolve)
      }
    },
    {
      path: '/pathto',
      name: 'pathto',
      meta: { title: '' },
      component: function (resolve) {
        require(['@/pages/PathTo'], resolve)
      }
    },
    {
      path: '/choicenesslist',
      name: 'choicenesslist',
      meta: { title: '篮球' },
      component: function (resolve) {
        require(['@/pages/productlist/ProductList'], resolve)
      }
    }
  ]
})
